#include "UtilityTools.h"
#include "Params.h"

#include <complex>

int GammaCorrection(STRC_IMG_ALL *img, CParams *param,  StrcParam devParam)
{
    int ret = 0;
    if (param->m_bUseGammaAmplitude)
    {
        uint16_t *pData = img->img_amplitude.data;
        for (int i = 0; i < (int)(img->img_amplitude.len/sizeof(uint16_t)); i++)
        {
            pData[i] = std::pow(pData[i] / 65535.0, param->m_GammaAmplitude) * 65535.0;
        }
    }
    return ret;
}